﻿@inherits Isha.Web.Mvc.IshaViewPage
@{
    ViewBag.Title = IshaModel.ContentItem.Title;
}
<table width="100%">
    <tr>
        <td style="width: 15%">
            @Html.Part("folderleftnavigation")
        </td>
        <td>
            <table>
                <tr>
                    <td>
                        <h1>@MvcHtmlString.Create(IshaModel.ContentItem.Title)</h1>
                        @Html.AuthenticatedPart("datetime")
                    </td>
                </tr>
                <tr>
                    <td>
                        @MvcHtmlString.Create(IshaModel.ContentItem.Description)
                    </td>
                </tr>
                <tr>
                    <td>
                        @if (IshaModel.ContentItem.ContentItems.Count > 0)
                        {
                            foreach (var item in IshaModel.ContentItem.ContentItems)
                            {
                                if (item.ContentType.Title != "Folder")
                                {
                            <div>
                                <h3>
                                    <a href="@IshaModel.ContentItem.Link/@item.Link">@item.Title</a></h3>
                                <span>@MvcHtmlString.Create(item.Description)</span>
                            </div>
                                }
                            }
                        }
                        else
                        {
                            <span>@MvcHtmlString.Create(IshaModel.Folder.BodyText ?? "")</span>
                        }
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
